/*
 *  Copyright (C) 2011 felixtheripper <felixtheripper_AT_gmail.com>
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

/**
 *
 * @author felixtheripper
 *
 * email: felixtheripper_AT_gmail.com
 * ... please remove "_AT_" from the above string to get the right email address
 *
 */


package org.myorg.ctm.etk.gui.swg.util.property;

import org.myorg.shr.gui.swg.util.property.PrpNamingAbs;

/**
 *
 * 
 */

public class PrpNamingEtk extends PrpNamingAbs
{



    // trick
    private PrpNamingEtk() {
        super ();

        String[] strs_logs_parent_folders =
        {
                System.getProperty(PrpNamingEtk.STR_PRP_APPLI_CACHE),
                System.getProperty(PrpNamingEtk.STR_PRP_NAME_SHORT),
                PrpNamingAbs.STR_APPLI_VERSION_TRANSFORMED
        };

        PrpNamingAbs.STRS_LOGS_PARENT_FOLDERS =strs_logs_parent_folders;

    }

    public static void s_init(){
        if (PrpNamingEtk._INSTANCE_== null){
            PrpNamingEtk._INSTANCE_ = new PrpNamingEtk();
        }
    }


    public static void s_destroy(){
        if(PrpNamingEtk._INSTANCE_ == null ){
            return;
        }
        _INSTANCE_ = null;
    }

    static
    {
            PrpNamingAbs.STR_APPLI_VERSION_TRANSFORMED =
                    PrpNamingEtk._s_replaceSpecialChar(System.getProperty(PrpNamingEtk.STR_PRP_APPLI_VERSION));
    }

    static private String _s_replaceSpecialChar(String strOri)
    {

        String strNew = "";

        for (int i = 0; i < strOri.length(); i ++)
        {
           if (strOri.charAt(i) == '.')
               strNew += "_";
           else if (strOri.charAt(i) == ' ')
               strNew += "_";
           else
               strNew += strOri.charAt(i);

        }

        return strNew;
    }
    private static PrpNamingEtk _INSTANCE_;
    final public static String STR_APPLI_NAME = "_ettiket";
    final public static String STR_PRP_APPLI_TITLE = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_APPLI_TITLE;
    final public static String STR_PRP_DEBUG = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_DEBUG;
    final public static String STR_PRP_APPLI_CACHE = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_APPLI_CACHE;
    final public static String STR_PRP_APPLI_VERSION = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_APPLI_VERSION;
    final public static String STR_PRP_NAME_SHORT = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_NAME_SHORT;
    final public static String STR_PRP_APP_HLP_CTN = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_APP_HLP_CTN;
    final public static String STR_PRP_APP_LIB_CPP = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_APP_LIB_CPP;
    final public static String STR_PRP_APP_GETTING_STARTED = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_APP_GETTING_STARTED;
    final public static String STR_PRP_APP_LANGUAGE = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_APP_LANGUAGE;
    final public static String STR_PRP_DTB_ROOT_PASS = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_DTB_ROOT_PASS;
    final public static String STR_PRP_CONFIG_PERFORMED= PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_CONFIG_PERFORMED_;
    final public static String STR_PRP_PATHABSLASTPARENTFOLDER = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_PATHABSLASTPARENTFOLDER;
    final public static String STRPRP_PATHABSLICENSE = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_PATHABSLICENSE;
    final public static String STR_PRP_USER_LAST_ = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_USER_LAST_;
    final public static String STR_PRP_MIM_HELP_CONTENTS = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_HELP_CONTENTS;
    final public static String STR_PRP_MIM_HELP_GETTINGSTARTED = PrpNamingEtk.STR_APPLI_NAME + PrpNamingAbs.STR_PRP_SHR_HELP_GETTINGSTARTED;

}  